package main

//2个协程不是同步执行的，需要再研究下
import "fmt"

func f(from string) {
	for i := 0; i <= 3; i++ {
		fmt.Println(from, ":", i)
	}
}
func main() {
	f("direct")
	go f("goroutine")

	//匿名函数启动一个go 协程
	go func(msg string) {
		fmt.Println(msg)
	}("going")

	fmt.Scanln()
	fmt.Println("done")
}
